{% extends "miramar/base.html" %}
{% load i18n %}
{% load miramar_tags %}

{% block title %}{% trans "Publish page version" %}{% endblock %}
{% block extrahead %}
{{ form.media }}
<script type="text/javascript" src="{{ MEDIA_URL }}{{ jquery_urlstub }}"></script>
<script type="text/javascript">
$(document).ready(function() {
  $("#header").hide();
  $(".breadcrumbs").hide();
});
</script>
{% endblock %}
{% block content_title %}<h1>{% trans "Publish page version" %}</h1>{% endblock %}

{% block content %}
<p>{% trans "You have selected:" %}<strong>{{ page.slug }} {{ pageversion.version_tag }}:rev{{ pageversion.revision }}</strong></p>
<table class="module">
  <caption>{% trans "Compare versions" %}</caption>
  <tr>
    <th>{% trans "Compare to:" %}</th>
    <td><select id="id_select_compare_to">
      {% for value, display in choices %}
      <option value="{{ value }}">{{ display }}</option>
      {% endfor %}
    </td>
  </tr>
</table>
<p><input type="button" id="id_button_submit" value="{% trans "Compare" %}" />
<input id="id_cancel" type="button" value="{% trans "Cancel" %}" />
<script type="text/javascript">
  $("#id_cancel").click(function() { window.parent.$.modal.close(); });
  $("#id_button_submit").click(function() {
    suffix = $("#id_select_compare_to option:selected").val();
    window.parent.location.href = location.href + suffix;
  });
</script>
{% endblock %}